package com.wuwei.tms.setting.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wuwei.tms.pojo.ToolType;
import com.wuwei.tms.setting.mapper.ToolTypeMapper;
import com.wuwei.tms.utils.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value="/T01/toolType")
public class ToolTypeController {

    @Resource
    private ToolTypeMapper toolTypeMapper;

    @GetMapping("/all")
    public Result<List<ToolType>> getAll (){
        LambdaQueryWrapper<ToolType> queryWrapper = new LambdaQueryWrapper<>();
        List<ToolType> toolTypes = toolTypeMapper.selectList(queryWrapper);
        return Result.ok(toolTypes);
    }
}
